package cc.taofoo.InnerClassTest;

/**
 * 匿名内部类
 * 测试ThreadPoolExecutor 的扩展
 */

public class Main {
    public static void main(String[] args) {
        Car car1 = new Car();
        car1.run();
        Car car2 = new Car(){
            @Override
            public void run() {
                System.out.println("Override method");
            }
        };
        car2.run();
    }
}

class Car{
    public void run(){
        System.out.println("car");
    }
}
